package com.training.java.core.collections;

import java.util.HashSet;
import java.util.Set;


	import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;

public class SetDemo {


		public static void main(String[] args) {
			
			Set<String> Student = new HashSet<String>();
			
			Student.add("Siva");
			Student.add("Satya");
			Student.add("Rheenu");
			Student.add("Raji");
			Student.add("Jaya");
			
			//reading from the set
			
			Iterator<String> ite = Student.iterator();
			
			while (ite.hasNext()){
				String studentName = ite.next();
				
				System.out.println(" Student Name : " + studentName);
			}
			
			System.out.println("   ");
			
			for (String studentName : Student) {
				System.out.println("Student Name :" + studentName );
				
			}
				
			}
}

